﻿/*
 * Module Name: Tree.cs
 * 
 * Purpose: This is an interface for the different tree types
 * 
 * Created by: Chris Tisdale
 */

using System;
using System.Collections.Generic;
using System.Text;

namespace Common_Code.Trees
{
    enum side
    {
        left,
        right
    };
    interface Tree<T> where T : IComparable
    {
        /*
         * Name: AddNode
         * 
         * Parameters: T item
         * 
         * Returns: None
         * 
         * Purpose: Adds an item to the tree
         */
        void AddNode(T item);
        /*
         * Name: DeleteNode
         * 
         * Parameters: T item
         * 
         * Returns: None
         * 
         * Purpose: If the item was removed true is returned, else false is returned
         */
        void DeleteNode(T item);
        /*
         * Name: ToArray
         * 
         * Parameters: NA
         * 
         * Returns: T[]
         * 
         * Purpose: This gives you all of the elements from the tree
         */
        T[] ToArray();
        /*
         * Name: FindItem
         * 
         * Parameters: T item
         * 
         * Returns: Node
         * 
         * Purpose: This gives you all of the elements from the tree
         */
         Node<T> FindItem(T item);
    }
}
